/*******************************************************************************
 *                                                                            
 *	Filename:	Delay.c
 * 
 *   	Author:		Duke Chang
 *   	Company:    	RAiO Technology Inc.
 *	Case:		320x240 
 *	Device:		MXIC MX10E8050IQC at 18.432MHz
 *   	Date:       	2005/10/21
 *	Modifier:	Duke Chang
 *	Modify Date:    2005/10/21
 *   	Visions:   	1.0
 *   	Compiled Using Keil C v7.50
 *	
 *******************************************************************************/

//------------------------------------------------------------------------------
//Parameter Defines
//------------------------------------------------------------------------------
typedef unsigned char uchar;

//------------------------------------------------------------------------------
//Subroutine Declare
//------------------------------------------------------------------------------
void Delay2us(uchar);
void Delay100us(uchar);
void Delay1ms(uchar);
void Delay10ms(uchar);
void Delay100ms(uchar);

//==============================================================================
//Subroutine:	Delay2us
//==============================================================================
void Delay2us(uchar Counter)
{
  while (--Counter)
    ;
}

//==============================================================================
//Subroutine:	Delay100us
//==============================================================================
void Delay100us(uchar Counter)
{
  while (Counter--)
  {
    Delay2us(150);
  }
}

//==============================================================================
//Subroutine:	Delay1ms
//==============================================================================
void Delay1ms(uchar Counter)
{
  while (Counter--)
  {
    Delay100us(11);
  }
}

//==============================================================================
//Subroutine:	Delay10ms
//==============================================================================
void Delay10ms(uchar Counter)
{
  while (Counter--)
  {
    Delay1ms(11);
  }
}

//==============================================================================
//Subroutine:	Delay100ms
//==============================================================================
void Delay100ms(uchar Counter)
{
  while (Counter--)
  {
    Delay1ms(101);
  }
}
